package com.maozzi.api.es.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * es blog model
 *
 * @author maozi
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "mysql-demo-log")
@Accessors(chain = true)
public class EsUserDTO implements Serializable {
    /**
     * 用户id
     */
    @Id
    private Long id;

    /**
     * 用户名称
     */
    @Field(type = FieldType.Text)
    private String name;

    /**
     * 用户头像
     */
    @Field(type = FieldType.Text)
    private String avatar;

    /**
     * 用户类型
     */
    @Field(type = FieldType.Integer)
    private Byte type;
}
